(outline-chart-subtree): Include outline-next-heading in loop conditions
authorRichard M. Stallman <rms@gnu.org>
Wed, 25 May 1994 04:41:21 +0000 (04:41 +0000)
committerRichard M. Stallman <rms@gnu.org>
Wed, 25 May 1994 04:41:21 +0000 (04:41 +0000)
to detect end-of-buffer (and avoid infinite loop).

lisp/allout.el

index 8f87eca6666ac99f468d3420f1a2296dc7df31fd..dde6c4cdca4af983e5f3b4e94442575930fc1f53 100644 (file)
@@ -1453,9 +1453,9 @@ starting point, and PREV-DEPTH is depth of prior topic."
                           (or (outline-next-sibling curr-depth)
                               ;; or no more siblings - proceed to
                               ;; next heading at lesser depth:
-                              (while (<= curr-depth
-                                         (outline-recent-depth))
-                                (outline-next-heading)))
+                              (while (and (<= curr-depth
+                                              (outline-recent-depth))
+                                          (outline-next-heading))))
                         (outline-next-heading)))
 
                      ((and (< prev-depth curr-depth)